


def find_replaced(arr):
    N = len(arr)
    temp = [0 for i in range(N+1)]
    sum = (1 + N) * N / 2
    sum1 = 0
    x, y = None, None
    for v in arr:
        sum1 += v
        if temp[v] == 0:
            temp[v] = 1
        else:
            print('the repeating element is ', v)
            x = v
    y = sum-sum1+x
    return [y, x]

